home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 February / PCWorld_2007-02_cd.bin / domacnost a kancelar / avedesk / AveDesk13.exe / Effects / AutoRise.effectlet next >
Extensible Markup Language  |  2005-06-17  |  3KB  |  138 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <effectlet>
  3.     <info>
  4.         <name>AutoRise Script</name>
  5.         <author>Dreadnaut</author>
  6.         <notes><![CDATA[ For bugs or anything else, contact me at dreadnaut@despammed.com ]]></notes>
  7.         <version>0.0.1</version>
  8.     </info>
  9.     <settings>
  10.         <param name="Debug" type="Boolean" defval="False"/>
  11.     </settings>
  12.  
  13.     <preferences>
  14.  
  15.  
  16. <!--
  17.     what about more possibilities ?
  18.  
  19.     <preference name="riseOn"    type="range" defval="0" min="0" max="3">
  20.     0    Mouse on
  21.     1    Select
  22.     2    Left click
  23.     3    Right click
  24.         </preference>
  25.     <preference name="sitOn"    type="range" defval="0" min="0" max="3">
  26.     0    Mouse out
  27.     1    Deselect
  28.     2    Left click
  29.     3    Right click
  30.         </preference>
  31. -->
  32.  
  33.     </preferences>
  34.  
  35.     <images>
  36.     </images>
  37.  
  38.     <script engine="vbScript"><![CDATA[
  39.  
  40.     Dim Counter
  41.     Dim Numb
  42.     Dim OriginalState
  43.  
  44.     Sub OnCreate()
  45.     riseOn = 0
  46.     sitOn = 0
  47.         Preferences.ReadAll()
  48.     OriginalState = Desklet.Style
  49.     End Sub
  50.  
  51.     Sub doRise()
  52.     if Desklet.Style <> styleTop Then
  53.         Numb = 1
  54.         Desklet.Style = styleTop
  55.     End If
  56.     End Sub
  57.  
  58.     Sub doSit()
  59.     if Desklet.Style <> OriginalState Then
  60.         Desklet.Style = OriginalState
  61.     End If
  62.     End Sub
  63.  
  64.  
  65.     Sub OnMouseOn()
  66.     If (riseOn = 0) Then
  67.         If (Numb = 0) Then
  68.             doRise()
  69.         Else
  70.             Numb = 0
  71.         End If
  72.     End If
  73.     End Sub
  74.  
  75.     Sub OnMouseout()
  76.     If (sitOn = 0) Then
  77.         If (Numb = 0) Then
  78.             doSit()
  79.         Else
  80.             Numb = 0
  81.         End If
  82.     End If
  83.     End Sub
  84.  
  85.     'Function OnBeforeDraw(IsMouseOn, IsSelected, IsPreview)
  86.     'End Function
  87.  
  88.     'Function OnAfterDraw(IsMouseOn, IsSelected, IsPreview)
  89.     'End Function
  90.     
  91.     Sub OnSave()
  92.     Desklet.Style = OriginalState
  93.         Preferences.SaveAll
  94.     End Sub
  95.  
  96. '    Function OnPreferenceChange(Preference, oldValue, newValue)
  97. '    End Function
  98.  
  99. '    Sub OnTimer()
  100. '    End Sub
  101.  
  102. '    Sub OnSelect()   
  103. '    End Sub
  104.  
  105. '    Sub OnDeselect()   
  106. '    End Sub
  107.  
  108.     'Sub OnShow()         
  109.     'End Sub
  110.  
  111.     'Sub OnHide()         
  112.     'End Sub
  113.  
  114.     'Sub OnConfigure() 
  115.         'the configuration dialog with default UI for
  116.         'XML preferences will be shown.
  117.         'An additional dialog designer is on its way. It will
  118.         'extend the available default preferences of type:
  119.         ' - slider, checkbox, combobox (builtin, v. 1.1, free on form with v. 1.2)
  120.         ' - textbox, file browser, favorites URL (builtin and free on form, v. 1.2)
  121.         ' - Any ocx (external, only free on form, v. 1.2)
  122.     'End Sub
  123.  
  124. '    Sub OnLeftClick()  
  125. '    End Sub
  126.  
  127. '    Sub OnRightClick()
  128. '    End Sub
  129.  
  130.     Sub OnDestroy
  131.     Numb = 1
  132.     Desklet.Style = OriginalState
  133.     End Sub
  134.  
  135.  
  136.     ]]></script>
  137. </effectlet>
  138.